#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableAutoChessHeroChessDao:DaoBase<TableAutoChessHeroChess>
    {
        public override string GetFileName()
        {
            return "TableAutoChessHeroChess.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableAutoChessHeroChess>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableAutoChessHeroChess model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.chessId)) UnityEngine.Debug.LogError("数据表id重复:TableAutoChessHeroChess->id: " + model.chessId);
            #endif
            cachePrimaryInt[model.chessId] = model;
        }
        protected override TableAutoChessHeroChess ParseRowData(string[] rowData)
        {
            TableAutoChessHeroChess data = new TableAutoChessHeroChess();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.chessId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.heroId = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.star = int.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.sortScore = int.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.buyPrice = int.Parse(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.sellPrice = int.Parse(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.hpCost = int.Parse(rowData[6]);
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.summonHpCost = int.Parse(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.DefaultSkill = int.Parse(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.defaultSkillLevel = int.Parse(rowData[9]);
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.skill1AIWeight = int.Parse(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.skill1 = int.Parse(rowData[11]);
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.skill1Level = int.Parse(rowData[12]);
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.skill2AIWeight = int.Parse(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.skill2 = int.Parse(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.skill2Level = int.Parse(rowData[15]);
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.skill3AIWeight = int.Parse(rowData[16]);
            }
            if (!string.IsNullOrEmpty(rowData[17]))
            {
                data.skill3 = int.Parse(rowData[17]);
            }
            if (!string.IsNullOrEmpty(rowData[18]))
            {
                data.skill3Level = int.Parse(rowData[18]);
            }
            if (!string.IsNullOrEmpty(rowData[19]))
            {
                data.ultimateSkillAIWeight = int.Parse(rowData[19]);
            }
            if (!string.IsNullOrEmpty(rowData[20]))
            {
                data.ultimateSkill = int.Parse(rowData[20]);
            }
            if (!string.IsNullOrEmpty(rowData[21]))
            {
                data.ultimateSkillLevel = int.Parse(rowData[21]);
            }
            if (!string.IsNullOrEmpty(rowData[22]))
            {
                data.activeSkills = int.Parse(rowData[22]);
            }
            if (!string.IsNullOrEmpty(rowData[23]))
            {
                data.skills = rowData[23];
            }
            if (!string.IsNullOrEmpty(rowData[24]))
            {
                data.passiveSkills = rowData[24];
            }
            if (!string.IsNullOrEmpty(rowData[25]))
            {
                data.atk = double.Parse(rowData[25]);
            }
            if (!string.IsNullOrEmpty(rowData[26]))
            {
                data.def = double.Parse(rowData[26]);
            }
            if (!string.IsNullOrEmpty(rowData[27]))
            {
                data.hp = double.Parse(rowData[27]);
            }
            if (!string.IsNullOrEmpty(rowData[28]))
            {
                data.speed = double.Parse(rowData[28]);
            }
            if (!string.IsNullOrEmpty(rowData[29]))
            {
                data.cri = double.Parse(rowData[29]);
            }
            if (!string.IsNullOrEmpty(rowData[30]))
            {
                data.anticri = double.Parse(rowData[30]);
            }
            if (!string.IsNullOrEmpty(rowData[31]))
            {
                data.hit = double.Parse(rowData[31]);
            }
            if (!string.IsNullOrEmpty(rowData[32]))
            {
                data.dodge = double.Parse(rowData[32]);
            }
            if (!string.IsNullOrEmpty(rowData[33]))
            {
                data.cridamage = double.Parse(rowData[33]);
            }
            if (!string.IsNullOrEmpty(rowData[34]))
            {
                data.block = double.Parse(rowData[34]);
            }
            if (!string.IsNullOrEmpty(rowData[35]))
            {
                data.antiblock = double.Parse(rowData[35]);
            }
            if (!string.IsNullOrEmpty(rowData[36]))
            {
                data.antiwhole = double.Parse(rowData[36]);
            }
            if (!string.IsNullOrEmpty(rowData[37]))
            {
                data.skillAI = rowData[37];
            }
            if (!string.IsNullOrEmpty(rowData[38]))
            {
                data.blockdamage = double.Parse(rowData[38]);
            }
            if (!string.IsNullOrEmpty(rowData[39]))
            {
                data.critreat = double.Parse(rowData[39]);
            }
            return data;
        }
    }
}
